#!/usr/bin/python

from benchmark import benchmark

ByteBuffer = 'FSByteBuffer'
Object = 'FSObject'
Array = 'FSArray'

def falseSharing(t):
	bm = benchmark(name = t, withPerf = True)
	bm.addArg(t)
	bm.addArg('1')
	bm.addArg('1')
	bm.addArg(str(100 * 1000 * 1000))
	bm.run()
	bm.setArg(1, "2")
	for stride in range(1, 12):
		bm.setArg(2, stride)
		bm.run()


def main():
	falseSharing(Object)
#	falseSharing(ByteBuffer)
#	falseSharing(Array)

if __name__ == '__main__':
	main()
